//*********************************************************
//
//    Copyright (c) Microsoft. All rights reserved.
//    This code is licensed under the Apache License, Version 2.0.
//    THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
//    ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
//    IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
//    PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************

using System;
namespace Microsoft.Research.eResearch.Execution
{
    /// <summary>
    /// Enumeration contains the user requested job status.
    /// </summary>
    internal enum InternalJobStatus
    {
        /// <summary>
        /// Default value when declared.
        /// </summary>
        None,

        /// <summary>
        /// Job is currently running.
        /// </summary>
        Running,

        /// <summary>
        /// Pause operation is requested by the user.
        /// </summary>
        PauseRequested,

        /// <summary>
        /// Stop operation is requested by the user.
        /// </summary>
        StopRequested,

        /// <summary>
        /// Resume operation is requested by the user.
        /// </summary>
        ResumeRequested
    }

    /// <summary>
    /// Event args for the job status change events.
    /// </summary>
    internal class JobStatusEventArgs : EventArgs
    {
        /// <summary>
        /// Gets the status of the job concerned.
        /// </summary>
        public InternalJobStatus JobStatus { get; private set; }

        /// <summary>
        /// Gets the message of the job.
        /// </summary>
        public string Message { get; private set; }

        /// <summary>
        /// Initializes a new instance of the Job status event args.
        /// </summary>
        /// <param name="status">The status of the job.</param>
        /// <param name="message">The message.</param>
        public JobStatusEventArgs(InternalJobStatus status, string message)
            : base()
        {
            this.JobStatus = status;
            this.Message = message;
        }

        /// <summary>
        /// Initializes a new instance of the Job status event args.
        /// </summary>
        /// <param name="status">The status of the job.</param>
        public JobStatusEventArgs(InternalJobStatus status)
            : base()
        {
            this.JobStatus = status;
        }
    }
}
